﻿using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KJSyncXP.Sqlite.Model
{
    /// <summary>
    /// 配置项实体类（映射数据库表）
    /// </summary>
    [Table(Name = "appconfig")] // 替换为实际表名
    public class appconfig
    {
        /// <summary>
        /// 内部标识号（主键、自增）
        /// </summary>
        [Column(IsPrimary = true, IsIdentity = true)]
        public int id { get; set; }

        /// <summary>
        /// 配置项名称
        /// </summary>
        [Column(Name = "Itemname", DbType = "varchar(255)")]
        public string itemname { get; set; }

        /// <summary>
        /// 配置大类
        /// </summary>
        [Column(Name = "itemclass", DbType = "varchar(255)")]
        public string itemclass { get; set; }

        /// <summary>
        /// 配置项值
        /// </summary>
        [Column(Name = "itemvalue", DbType = "varchar(255)")]
        public string itemvalue { get; set; }

        /// <summary>
        /// 配置项旧值
        /// </summary>
        [Column(Name = "itemoldvalue", DbType = "varchar(255)")]
        public string itemoldvalue { get; set; }

        /// <summary>
        /// 创建日期
        /// </summary>
        [Column(Name = "createdate", DbType = "datetime2")]
        public DateTime? createdate { get; set; } // 表中允许为 null，故设为可空类型

        /// <summary>
        /// 配置项目描述
        /// </summary>
        [Column(Name = "itemdesc", DbType = "varchar(255)")]
        public string itemdesc { get; set; }

        /// <summary>
        /// 是否在用
        /// </summary>
        [Column(Name = "inuse", DbType = "varchar(255)")]
        public string inuse { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Column(Name = "remark", DbType = "varchar(255)")]
        public string remark { get; set; }

        /// <summary>
        /// 宿主
        /// </summary>
        [Column(Name = "ownerid")]
        public int? ownerid { get; set; } // 表中允许为 null，故设为可空类型
    }
}
